<layout name="master"/>


<ul class="breadcrumb no-border no-radius b-b b-light pull-in">
    <li><a href="index.html"><i class="fa fa-home"></i> Home</a></li>
    <li><a href="#">UI kit</a></li>
    <li><a href="#">Form</a></li>
    <li class="active">Elements</li>
</ul>
<div class="m-b-md">
    <h3 class="m-b-none">权限组添加</h3>
</div>
<div class="row">
    <div class="col-sm-8">
        <section class="panel panel-default">
            <header class="panel-heading font-bold">添加权限组</header>
            <div class="panel-body">
                <form role="form" method="post" action="">
                    <div class="form-group">
                        <label>权限组名称</label>
                        <input type="text" name='title' value="{$olddate['title']}" class="form-control"
                               placeholder="超级权限组">
                    </div>
                    <div class="checkbox form-group">
                        <h2 style="font-weight: normal;font-size: 16px">请选择权限</h2>

                        <if condition="isset($_GET['id'])">
                            <foreach name="rules" item="vo">
                                <label>
                                    <input name="rules[]" <if condition="in_array($vo['id'],$olddate['rules'])">checked</if> type="checkbox" value="{$vo['id']}" > {$vo['title']} &nbsp; &nbsp; &nbsp;
                                </label>
                            </foreach>
                            <else/>
                            <foreach name="rules" item="vo">
                                <label>
                                    <input name="rules[]"
                                    <if condition="$vo['id'] eq 1 ">checked</if> type="checkbox" value="{$vo['id']}" > {$vo['title']} &nbsp; &nbsp; &nbsp;
                                </label>
                            </foreach>
                        </if>

                    </div>

                    <button type="submit" class="btn btn-sm btn-success">提交</button>
                </form>
            </div>
        </section>
    </div>
</div>


